package com.maimao.model.order.input;

import com.maimao.model.order.Order;
import com.maimao.model.order.OrderShop;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * 提交的订单实体
 *
 * @author MaoLin Wang
 * @date 2021/1/17 12:46 下午
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class CommitOrder implements Serializable {


    private static final long serialVersionUID = -8063109692168314857L;

    @Valid
    @NotNull(message = "订单信息异常")
    private Order order;

    @Valid
    @NotNull(message = "订单商品信息异常")
    private List<OrderShop> orderShopList;

    @Override
    public String toString() {
        return "CommitOrder{" +
                "order=" + order +
                ", orderShopList=" + orderShopList +
                '}';
    }
}
